package com.imooc.o2o.service;

import org.springframework.web.multipart.commons.CommonsMultipartFile;
import com.imooc.o2o.dto.WechatAuthExecution;
import com.imooc.o2o.entity.WechatAuth;

/**
 * Created by Knight on 2018/7/12.
 */
public interface WechatAuthService {
    /**
     * 通过openId查找对应的微信账号
     * @param openId
     * @return
     */
    WechatAuth getWechatAuthByOpenId(String openId);

    /**
     * 注册本平台的微信账号
     * @param wechatAuth
     * @param profileImg
     * @return
     * @throws RuntimeException
     */
    WechatAuthExecution register(WechatAuth wechatAuth, CommonsMultipartFile profileImg) throws RuntimeException;
}
